<?php
/**
*区域总监市场数据分析
*/
require("./include/init.php");

$mysql=mysql::getIns();

$redis = new Redis();
  //连接服务器
  $redis->connect("localhost");
  //授权
  $redis->auth("redis=pwd@2016");

$address=$_REQUEST['address'];
date_default_timezone_set('Asia/Shanghai');
switch ($address) {
  case '北京博瑞祥星汽车销售有限公司':
    $hash='Area_MarketDirector_brxx';
    break;
  case '义乌市博奥汽车销售服务有限公司':
    $hash='Area_MarketDirector_ywba';
    break;
  case '江苏天奥汽车销售服务有限公司':
    $hash='Area_MarketDirector_jsta';
    break;
  case '广东粤奥汽车销售服务有限公司':
    $hash='Area_MarketDirector_gdya';
    break;
  case '辽宁鑫迪汽车销售服务有限公司':
    $hash='Area_MarketDirector_lnxd';
    break;
  case '成都新元素雅麓汽车销售服务有限公司':
    $hash='Area_MarketDirector_cdyl';
    break;
  case '云南驰泰汽车销售服务有限公司':
    $hash='Area_MarketDirector_ynct';
    break;
  case '宁夏奥立升汽车销售服务有限公司':
    $hash='Area_MarketDirector_nxals';
    break;
  case '陕西奥诚汽车销售服务有限公司':
    $hash='Area_MarketDirector_sxac';
    break;
}

$data=$redis->hmget($hash, array(
  'allnow',
  'allday',
  'yesdallday',
  'onejk',
  'twojk',
  'threejk',
  'fourjk',
  'fivejk',
  'sixjk',
  'sevenjk',
  'firstjk',
  'secondjk',
  'thirdjk',
  'fourthjk',
  'firstmonthjk',
  'secondmonthjk',
  'thirdmonthjk',
  'fourthmonthjk',
  'firstlogin',
  'sale',
  'service',
  'second',
  'login',
  'nolog',
  'history',
  'allweekjk',
  'allmonthjk',
  'allyearjk',
  'maxjk',
  'minjk',
  'alldaycountry',
  'daycountry',
  'vtwo',
  'vthree',
  'vmore',
  'vone',
));
$allnow=$data['allnow'];
$allday=$data['allday'];
$yesdallday=$data['yesdallday'];
$onejk=$data['onejk'];
$twojk=$data['twojk'];
$threejk=$data['threejk'];
$fourjk=$data['fourjk'];
$fivejk=$data['fivejk'];
$sixjk=$data['sixjk'];
$sevenjk=$data['sevenjk'];
$firstjk=$data['firstjk'];
$secondjk=$data['secondjk'];
$thirdjk=$data['thirdjk'];
$fourthjk=$data['fourthjk'];
$firstmonthjk=$data['firstmonthjk'];
$secondmonthjk=$data['secondmonthjk'];
$thirdmonthjk=$data['thirdmonthjk'];
$fourthmonthjk=$data['fourthmonthjk'];
$allweekjk=$data['allweekjk'];
$allmonthjk=$data['allmonthjk'];
$allyearjk=$data['allyearjk'];
$maxjk=$data['maxjk'];
$minjk=$data['minjk'];
$alldaycountry=$data['alldaycountry'];
$daycountry=$data['daycountry'];
$vtwo=$data['vtwo'];
$vthree=$data['vthree'];
$vmore=$data['vmore'];
$vone=$data['vone'];

// print_r($data);
// exit;
require(ROOT . 'view/iwocar5/Area_MarketDirector.html');
 ?>
